<?php
namespace App\Modules\Fund;
use App\Modules\AdapterApi;
use App\Services\Fund\FundIndex;
/**
 * Created by PhpStorm.
 * User: 97606
 * Date: 2018/6/12
 * Time: 10:10
 */
class IntegralAccount extends AdapterApi
{
    /*兑换钱*/
//   public function exchange(): array
//    {
//        $data = pick_array($this->postData, ['exchange', 'money','app_id','currency_scale']);
//        return FundIndex::IntegralAccount()->exchange($data);
//    }
    # 充值 系统->a
    public function prepaid(): array
    {
        $data = pick_array($this->postData, ['user_id', 'integral','token','user_info','opposite_info','remark']);
        return FundIndex::IntegralAccount()->prepaid($data);
    }
    # 冻结 a
    public function freeze(): array
    {
        $data = pick_array($this->postData, ['user_id', 'integral','token','reason']);
        return FundIndex::IntegralAccount()->adminFreeze($data);
    }
    # 解冻 a
   public function unfreeze(): array
    {
        $data = pick_array($this->postData, ['user_id', 'integral', 'obj_id', 'remark', 'token']);
        return FundIndex::IntegralAccount()->unfreeze($data);
    }
    // 获取列表
    public function list(): array
    {
         $data = pick_array($this->postData, ['page','list_rows','token','keywords']);
        return FundIndex::IntegralAccount()->list($data);
    }
    // 某user_ids的用户资金列表
    public function listByUserIds(): array
    {
         $data = pick_array($this->postData, ['user_ids','token']);
        return FundIndex::IntegralAccount()->listByUserIds($data);
    }
}